using System;
using System.Linq.Expressions;

namespace Charisma.MongoDb.Linq.Expressions
{
  internal sealed class AggregateScalarExpression : MongoExpression
  {
    public AggregateExpression Aggregate { get; private set; }
    public ScalarExpression Subquery { get; private set; }

    public AggregateScalarExpression(Type type, AggregateExpression aggregate, ScalarExpression subquery)
      : base(MongoExpressionType.AggregateScalar, type)
    {
      Aggregate = aggregate;
      Subquery = subquery;
    }
  }
}